<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<title>dom0级事件监听</title>
	<style type="text/css">
		#outer{
			width: 300px;
			height: :300px;
		}
	</style>
</head>
<body>
<div id="dev">距离喀什大</div>
<div id="outer">；卢卡斯大</div>
<script type="text/javascript">
var oDiv = document.getElementById('dev');
oDiv.onmouseover = function () {
	oDiv.style.backgroundColor = 'red';
}
// 把鼠标移入
oDiv.onmouseover = function () {
	oDiv.style.backgroundColor = 'green';
}
// 把鼠标离开
oDiv.onmouseout = function () {
	oDiv.style.backgroundColor = 'blue';
}
var outer = document.getElementById('outer');
outer.onmousedown = function (ev) {
	console.log(ev.button);
}
outer.onmouseup = function (ev) {
	console.log('鼠标抬起来了');
}

</script>


</body>
</html>